{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "collapsed": true,
        "pycharm": {
          "name": "#%% md\n"
        }
      },
      "source": "# 信息熵和基尼系数"
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "outputs": [],
      "source": "import pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "## 读取目标文件前三列",
      "metadata": {
        "pycharm": {
          "metadata": false
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 2,
      "outputs": [],
      "source": "m_data \u003d pd.read_csv(\u0027./data/rating.csv\u0027, sep\u003d\u0027,\u0027, usecols\u003d[\"userId\",\"movieId\",\"rating\"])",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 3,
      "outputs": [
        {
          "data": {
            "text/plain": "   userId  movieId  rating\n0       1        2     3.5\n1       1       29     3.5\n2       1       32     3.5\n3       1       47     3.5\n4       1       50     3.5",
            "text/html": "\u003cdiv\u003e\n\u003cstyle scoped\u003e\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n\u003c/style\u003e\n\u003ctable border\u003d\"1\" class\u003d\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style\u003d\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003euserId\u003c/th\u003e\n      \u003cth\u003emovieId\u003c/th\u003e\n      \u003cth\u003erating\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e0\u003c/th\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n      \u003ctd\u003e3.5\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e1\u003c/th\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e29\u003c/td\u003e\n      \u003ctd\u003e3.5\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2\u003c/th\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e32\u003c/td\u003e\n      \u003ctd\u003e3.5\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e3\u003c/th\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e47\u003c/td\u003e\n      \u003ctd\u003e3.5\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e4\u003c/th\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e50\u003c/td\u003e\n      \u003ctd\u003e3.5\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e"
          },
          "metadata": {},
          "output_type": "execute_result",
          "execution_count": 3
        }
      ],
      "source": "m_data.head()",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "## 每个电影id对应的打分次数",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 4,
      "outputs": [
        {
          "data": {
            "text/plain": "296    67310\n356    66172\n318    63366\n593    63299\n480    59715\nName: movieId, dtype: int64"
          },
          "metadata": {},
          "output_type": "execute_result",
          "execution_count": 4
        }
      ],
      "source": "movie_rating_counts \u003d m_data[\u0027movieId\u0027].value_counts()\nmovie_rating_counts.head()",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "## 深度copy一个movie_rating_counts",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 6,
      "outputs": [],
      "source": "movie_rating_counts_bak \u003d movie_rating_counts.copy()",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "## 重置索引，画图",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 7,
      "outputs": [
        {
          "data": {
            "text/plain": "0    67310\n1    66172\n2    63366\n3    63299\n4    59715\nName: movieId, dtype: int64"
          },
          "metadata": {},
          "output_type": "execute_result",
          "execution_count": 7
        }
      ],
      "source": "movie_rating_counts_bak.index \u003d range(movie_rating_counts.count())\nmovie_rating_counts_bak.head()",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "## 横坐标--索引，纵坐标--打分次数",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 8,
      "outputs": [
        {
          "data": {
            "text/plain": "\u003cFigure size 432x288 with 1 Axes\u003e",
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEXCAYAAACH/8KRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deZhdVZ3v//enpswzAUNCCGqYpAUhQGx8vLRIGFoJjXjF1ktA2nT7w1bbbhW77YYrraK/e/WCMy0RsEEGFYh0kE4zXBwCJMyEwYQxRRgCISEhkKSqvvePvU6yq+pU1dmpOnVq+Lye53D2W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2OAP4D+LqyZQfayNa5KNV9KtnkgB+KiJU9nBvg7ohoBpB0P9nfwGayv5NVKf3fgdJ6OfOAk7Sz72YkMDMiHpV0RqrbjyPi9xW8t1WRA4lV09bcdlvudRvZ3165voog+9fq2yVNJWvz/9cOeerIFvI5pEBZXs9tnw/cFhF/oWyhodsrPEe+PurwXAlRfp2Irs7RQvvm55G57e2R/qkOtNL1/8t/TrZc70nAP0t6R3TdR9SxbAF8jCxgHBYR2yU9nSvHRrKriaPIJgPtSf7zy5e5qwn/RBakHi+zbzZZENqzgve1KnMfidXSHWQ/VKS2/5cj4rX0A3kd8G2yqbdfyR+U/iX/lKQPp2Ml6eAC7zsBeC5tn5FL30S2pnYRvwM+lPpK9iBrwunKY8Cepb6E1D/SQPvPYV9gJtmsr08Dh6Rz78XO9Sq6s6MOkuqAvSLiNuCLZM1DY7s5dn7qr5mS6rGc7LN6KQWRPyO7iizZRhboT5f0lxWUrZzHgH0kvS29/mhu383A3+b6Ut6VnieQNX++F5jSXZ+U9Q8HEqul84A5kh4ELmDn+hOQNWd9nA7NWjkfA86SVJoav1MncDe+BXxD0u+B+lz6bcCBpc72Cs/1S7Lp3R8Gfky2hOrGchkjW2f7I8B3U7mXkv3r/gdAfWryuxo4IyK2Ar8HniKbavx/AfdWUJ6rgC9Iuo/sX+3/ns57H/CdiNjQzbF3kzVl3QmcH9liaFeQfUcryD7zxzrU6XXgA8DfSZovaU9JSyooZ+n4N8masv4jdbY/k9t9Plmz44PKhhqfn9K/A/wgIv5INq3+BZJ2x2rG08ib9ZKksRGxOf1L/m6yzt8Xal0us/7iPhKz3rtR2XDlJrJ/yTuI2LDiKxIbMiT9E/DhDsnXRsTXalCW64B9OiR/KSJqujSxpDOBz3ZI/n1EnF2L8tjQ4EBiZma94s52MzPrFQcSMzPrFQcSMzPrFQcSMzPrlf8HvNMg5puxKMIAAAAASUVORK5CYII\u003d\n"
          },
          "metadata": {
            "needs_background": "light"
          },
          "output_type": "display_data"
        }
      ],
      "source": "plt.plot(movie_rating_counts_bak.index, movie_rating_counts_bak)\nplt.xlabel(\u0027movie_rating_counts_bak.index\u0027)\nplt.ylabel(\u0027movie_rating_counts_bak\u0027)\nplt.title(\u0027movie rating count\u0027)\nplt.show()",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 13,
      "outputs": [
        {
          "data": {
            "text/plain": "123607    1\n90823     1\n123609    1\n123613    1\n131136    1\nName: movieId, dtype: int64"
          },
          "metadata": {},
          "output_type": "execute_result",
          "execution_count": 13
        }
      ],
      "source": "movie_rating_counts.tail()",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "## 数据集中出现的最大的电影id",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 14,
      "outputs": [
        {
          "name": "stdout",
          "text": [
            "最大电影id: 131262\n"
          ],
          "output_type": "stream"
        }
      ],
      "source": "max_movie_id \u003d movie_rating_counts.index.max()\nprint(\u0027最大电影id:\u0027, max_movie_id)",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "## 总打分数",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 16,
      "outputs": [
        {
          "name": "stdout",
          "text": [
            "总打分数： 20000263\n"
          ],
          "output_type": "stream"
        }
      ],
      "source": "total_rating_counts \u003d sum(movie_rating_counts)\nprint(\u0027总打分数：\u0027, total_rating_counts)",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "## 参与评论的电影数量",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 17,
      "outputs": [
        {
          "name": "stdout",
          "text": [
            "参与评论的电影数量: 26744\n"
          ],
          "output_type": "stream"
        }
      ],
      "source": "movie_quantity \u003d movie_rating_counts.count()\nprint(\u0027参与评论的电影数量:\u0027, movie_quantity)",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "# 信息熵",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 21,
      "outputs": [
        {
          "name": "stdout",
          "text": [
            "4.999934250864601e-08\n"
          ],
          "output_type": "stream"
        }
      ],
      "source": "h \u003d 0\nfor movie_rating_count in movie_rating_counts:\n    p \u003d movie_rating_count / total_rating_counts\n    logp \u003d np.log(p)\n    h +\u003d -1 * p * logp\nprint(p)",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "# 基尼指数",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 22,
      "outputs": [
        {
          "name": "stdout",
          "text": [
            "0.9029762612602118\n"
          ],
          "output_type": "stream"
        }
      ],
      "source": "gini_index \u003d 0\nfor index in range(len(movie_rating_counts)):\n    p \u003d movie_rating_counts.iloc[index] / total_rating_counts\n    j \u003d movie_quantity - index\n    gini_index +\u003d (2 * j - movie_quantity - 1) * p\ngini_index \u003d gini_index / (movie_quantity - 1)\nprint(gini_index)",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": "# 计算覆盖度",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%% md\n"
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": 23,
      "outputs": [
        {
          "name": "stdout",
          "text": [
            "0.20374518139293932\n"
          ],
          "output_type": "stream"
        }
      ],
      "source": "coverage \u003d movie_quantity / max_movie_id\nprint(coverage)",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n",
          "is_executing": false
        }
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "outputs": [],
      "source": "\n",
      "metadata": {
        "pycharm": {
          "metadata": false,
          "name": "#%%\n"
        }
      }
    }
  ],
  "metadata": {
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 2
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython2",
      "version": "2.7.6"
    },
    "kernelspec": {
      "name": "python3",
      "language": "python",
      "display_name": "Python 3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}